<template>
  <div class="not-found">
    <div class="content">
      <h1>404</h1>
      <h2>抱歉，页面不存在</h2>
      <p>您可能输入了错误的 URL 或页面已被移除。</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
      <el-button type="default" @click="goPrevious">返回上一页</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { useRoute } from 'vue-router'

const router = useRouter()
const route = useRoute()

const goHome = () => {
  router.push('/dashboard')
}

const goPrevious = () => {
  router.go(-1)
}
</script>

<style scoped>
.not-found {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f2f5 0%, #d1d5db 100%);
  color: #333;
  font-family: 'Arial', sans-serif;
}

.content {
  text-align: center;
  background-color: #fff;
  padding: 80px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 120px;
  color: #0960d0;
  margin: 0;
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  color: #333;
  margin: 20px 0 20px;
  font-weight: normal;
}

p {
  font-size: 16px;
  color: #666;
  margin: 20px 0;
  font-weight: normal;
}

.el-button {
  margin: 0 10px;
  padding: 12px 24px;
  font-size: 16px;
}

.el-button--primary {
  background-color: #0960d0;
  border-color: #0960d0;
}

.el-button--primary:hover {
  background-color: #064689;
  border-color: #064689;
}

.el-button--default {
  background-color: #f0f2f5;
  border-color: #d1d5db;
  color: #333;
}

.el-button--default:hover {
  background-color: #e5e7eb;
  border-color: #d1d5db;
}
</style>
